<!DOCTYPE html>
<html>
<!--
Copyright 2011 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head>
<title>Path Reference: ancestor</title>
<link rel="stylesheet" href="common_styles.css">
<script src="include.js"></script>
<style>
.person.dogOwner {
  color: green;
}

.person {
  color: red;
}
</style>
</head>
<body>
  <div class="example">
    <h1>Path Reference, ancestor: ../</h1>
    <div class="content">
      <ul>
      <template iterate="employees">
        <li>{{ ./ }} works for {{ ../../boss }}</li>
      </template>
      </ul>
    </div>
  </div>

<script>
document.body.model = {
  boss: 'Lumbergh',
  employees: [
    'Michael',
    'Peter',
    'Samir'
  ]
};
</script>

  <div class="comment">
    <h1>Comment</h1>
    <div class="content">
      Most commonly useful in iterations, it is often needed to get a value
      above the item currently in scope. The '../[../]*' path locates a path
      above the current item. Here, within each iteration, the 'boss' value is
      selected via '../../boss'.
    </div>
  </div>
</body>
</html>